
#import <UIKit/UIKit.h>
#import "SimPageScrollViewDataSource.h"
#import "SimPageScrollViewDelegate.h"

extern NSString * const kSimPageScrollViewWillDisappearPageNoti;

@interface SimPageScrollView : UIScrollView

@property (nonatomic, weak) id<SimPageScrollViewDataSource> dataSource;
@property (nonatomic, weak) id<SimPageScrollViewDelegate> pageDelegate;

@property (nonatomic) BOOL isVerticalScroll;
@property (nonatomic) NSInteger numberOfReusableViews;

@property (nonatomic, readonly) NSInteger currentPageIndex;
@property (nonatomic, readonly) UIView *curPageView;
@property (nonatomic, readonly) NSMutableDictionary *availablePages;

- (void)clearPageAtIndex:(NSNumber *)pageIndex;
- (void)clearAllPageView;

- (id)viewForPage:(NSInteger)page;
- (void)displayPage:(NSInteger)pageIndex animated:(BOOL)animated;

- (void)setupScrollViewForDisplayingPage:(NSInteger)pageIndex;
- (void)deletePageAtIndex:(NSInteger)pageIndex;


@end
